/*
 * @Author: your name
 * @Date: 2022-04-13 20:48:37
 * @LastEditTime: 2022-04-14 20:53:51
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \drivingTow\src\usege\entities\usege.entity.ts
 */
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
import { UsegeInfoDto } from "../dto/create-usege.dto";

@Entity('Usege')
export class Usege {
  @PrimaryGeneratedColumn()
  id:number;

  @Column() // 车牌号
  licensePlate:string

  @Column() // 使用教练员ID
  coach:string

  @Column() // 使用教练员名字
  coachName:string

  @Column() // 使用时间
  create_time:string

  @Column() // 归还时间
  return_time:string

  @Column() // 使用需求
  need:string

  @Column() // 车况
  vehicle_condition:string

  @Column() // 油量
  oil_quantity:number

  toResponseObject(): UsegeInfoDto {
    let responseObj: UsegeInfoDto = {
      ...this,
    };
    return responseObj;
  }
}
